home *** CD-ROM | disk | FTP | other *** search
/ Developer Helper 1: Phil & Dave's Excellent CD / Excellent CD HFS.raw / HyperCard / HyperCard 1.2.2 International / HyperCard Danish (DK-1.2.2) / Idestakke / Baggrundsideer / background_56064.txt < prev    next >
Text File  |  1988-12-19  |  5KB  |  206 lines

  1. -- background: 56064 from stack: in
  2. -- bmap block id: 30863
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on newStack
  8.   extend
  9. end newStack
  10.  
  11. on extend
  12.   -- type "extend" into the message box and press return to make
  13.   -- three months worth of new cards.
  14.   if the name of this stack contains "Baggrundsideer"
  15.   then
  16.   answer "Opret venligst en ny stak, f√∏r den udvides." with "OK"
  17. else
  18.   answer "Skal der laves nye kort til tre m√•neder?" with "OK" or "Annuller"
  19.   if it is "Annuller" then exit extend
  20.   go to last card of this background
  21.   put getStartDate() into start      --what date to begin on
  22.   if start is "Annuller" then exit extend
  23.   put 60*60*24 into OneDay      --seconds in a day
  24.   repeat with cnt = 1 to (365 div 4)   --three months
  25.     put start into it        --a copy
  26.     convert it to long date
  27.     put it into field "Dato"
  28.     add OneDay to start
  29.     doMenu New Card
  30.   end repeat
  31.   convert start to long date     --fix the last card
  32.   put start into field "Dato"
  33. end if
  34. end extend
  35.  
  36. function getStartDate
  37. -- end of stack or today, whichever is newer
  38. get field "Dato"
  39. if it is empty then put the short date into it
  40. convert it to seconds    --so we can compare
  41. put the short date into today
  42. convert today to seconds
  43. if today < 2587766400 then
  44.   answer "Indstil Kontrolpanelet til dags dato" with "OK"
  45.   return "Annuller"
  46. end if
  47. if it >= today then return it   --calendar already beyond today
  48. convert it to short date
  49. answer "Startende fra hvilken dato?" with it or the short date or "Annuller"
  50. if it is "Annuller" then return it
  51. convert it to seconds
  52. return it
  53. end getStartDate
  54.  
  55. on openBackground
  56.   push recent card
  57. end openBackground
  58.  
  59.  
  60. -- part 2 (button)
  61. -- low flags: 00
  62. -- high flags: 0000
  63. -- rect: left=421 top=47 right=73 bottom=452
  64. -- title width / last selected line: 0
  65. -- icon id / first selected line: 15972 / 15972
  66. -- text alignment: 1
  67. -- font id: 0
  68. -- text size: 12
  69. -- style flags: 0
  70. -- line height: 16
  71. -- part name: gå til kalender
  72. ----- HyperTalk script -----
  73. on mouseUp
  74.   set lockscreen to true
  75.   go to "Kalender"
  76.   goWeekly the seconds
  77. end mouseUp
  78.  
  79.  
  80.  
  81. -- part 4 (field)
  82. -- low flags: 01
  83. -- high flags: 4000
  84. -- rect: left=61 top=100 right=282 bottom=448
  85. -- title width / last selected line: 0
  86. -- icon id / first selected line: 0 / 0
  87. -- text alignment: 0
  88. -- font id: 2
  89. -- text size: 14
  90. -- style flags: 0
  91. -- line height: 18
  92. -- part name: 
  93.  
  94.  
  95. -- part 7 (button)
  96. -- low flags: 00
  97. -- high flags: 0000
  98. -- rect: left=231 top=285 right=310 bottom=258
  99. -- title width / last selected line: 0
  100. -- icon id / first selected line: 1014 / 1014
  101. -- text alignment: 1
  102. -- font id: 0
  103. -- text size: 12
  104. -- style flags: 0
  105. -- line height: 16
  106. -- part name: Prev
  107. ----- HyperTalk script -----
  108. on mouseUp
  109.   visual effect wipe right
  110.   go to previous card
  111. end mouseUp
  112.  
  113.  
  114.  
  115. -- part 8 (button)
  116. -- low flags: 00
  117. -- high flags: 0000
  118. -- rect: left=262 top=285 right=310 bottom=289
  119. -- title width / last selected line: 0
  120. -- icon id / first selected line: 1013 / 1013
  121. -- text alignment: 1
  122. -- font id: 0
  123. -- text size: 12
  124. -- style flags: 0
  125. -- line height: 16
  126. -- part name: Next
  127. ----- HyperTalk script -----
  128. on mouseUp
  129.   visual effect wipe left
  130.   go to next card
  131. end mouseUp
  132.  
  133.  
  134.  
  135. -- part 9 (field)
  136. -- low flags: 00
  137. -- high flags: 0000
  138. -- rect: left=269 top=74 right=90 bottom=448
  139. -- title width / last selected line: 0
  140. -- icon id / first selected line: 0 / 0
  141. -- text alignment: 65535
  142. -- font id: 3
  143. -- text size: 9
  144. -- style flags: 0
  145. -- line height: 12
  146. -- part name: Dato
  147.  
  148.  
  149. -- part 10 (button)
  150. -- low flags: 00
  151. -- high flags: 8004
  152. -- rect: left=422 top=321 right=338 bottom=468
  153. -- title width / last selected line: 0
  154. -- icon id / first selected line: 0 / 0
  155. -- text alignment: 1
  156. -- font id: 3
  157. -- text size: 9
  158. -- style flags: 0
  159. -- line height: 12
  160. -- part name: Udvid
  161. ----- HyperTalk script -----
  162. on mouseUp
  163.   extend
  164. end mouseUp
  165.  
  166.  
  167.  
  168. -- part 11 (button)
  169. -- low flags: 00
  170. -- high flags: 0000
  171. -- rect: left=421 top=283 right=311 bottom=458
  172. -- title width / last selected line: 0
  173. -- icon id / first selected line: 1012 / 1012
  174. -- text alignment: 1
  175. -- font id: 0
  176. -- text size: 12
  177. -- style flags: 0
  178. -- line height: 16
  179. -- part name: Retur
  180. ----- HyperTalk script -----
  181. on mouseUp
  182.   visual effect iris close
  183.   pop card
  184. end mouseUp
  185.  
  186.  
  187.  
  188. -- part 12 (button)
  189. -- low flags: 00
  190. -- high flags: 0000
  191. -- rect: left=47 top=284 right=313 bottom=79
  192. -- title width / last selected line: 0
  193. -- icon id / first selected line: 21700 / 21700
  194. -- text alignment: 1
  195. -- font id: 0
  196. -- text size: 12
  197. -- style flags: 0
  198. -- line height: 16
  199. -- part name: Hjem
  200. ----- HyperTalk script -----
  201. on mouseUp
  202.   visual effect iris open
  203.   go Home
  204. end mouseUp
  205.  
  206.